package cn.stonemind.smu.system.controller;

import cn.stonemind.smu.common.entity.SmuResponse;
import cn.stonemind.smu.common.entity.system.User;
import cn.stonemind.smu.system.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/{id}")
    public SmuResponse get(@PathVariable Long id) {
        User user = userService.get(id);
        return new SmuResponse().result(user);
    }
}
